package com.example.riskmanage.controller;

import com.example.riskmanage.bean.Riskyujing;
import com.example.riskmanage.service.RiskyujingManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RiskyujingController {

    @Autowired
    RiskyujingManager riskyujingManager;

    @RequestMapping("/getrisklist")
    public String risklist(Integer id) {
        String RESPONE = riskyujingManager.getRiskyujingService(id);
        return RESPONE;

    }

    @RequestMapping("/riskyujinglist")
    public String add( Riskyujing riskyujing){
        String flags = riskyujingManager.addRiskyujingService(riskyujing);
        return flags;
    }

    @RequestMapping("/deleterisklist")
    public String delete(Integer id) {
        String flag = riskyujingManager.deleteRiskyujingService(id);
        return flag;
    }
}
